package com.bdy.lm.taximanager.util;

import android.graphics.Color;
import android.view.View;
import android.widget.Toast;

import com.bdy.lm.taximanager.app.MyApp;

/**
 * Created by Selfmade on 2017/7/13/0013.
 */

public class ToastUtils {

    private static Toast toast;

    public static void showToast(String content) {
        if (toast == null) {
            toast = Toast.makeText(MyApp.context, content, Toast.LENGTH_LONG);
        } else {
            toast.setText(content);
        }
        View view = toast.getView();
        view.setBackgroundColor(Color.RED);
        toast.setView(view);
        toast.show();
    }
}
